package org.wanda.pv.controller.business;

import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wanda.pv.framework.base.Result;
import org.wanda.pv.model.business.ProjectCheckNotice;

import java.util.List;

/**
 * @author lxy
 * Created by 2019/1/3 14:50
 */
@RestController
@RequestMapping("/business/projectCheckNotice")
public class ProjectCheckNoticeController {
	private static final 	String CONDITION_PROJECT = "projectId";
	private static final 	String CONDITION_USER = "userId";
	@Autowired
	private Dao dao;

	@RequestMapping("/getAllNotice")
	public Object getAllNotice(){
		List<ProjectCheckNotice> checkNotices = dao.query(ProjectCheckNotice.class, Cnd.where("delFlag", "=", "0"));
		checkNotices.forEach(checkNotice -> {
			dao.fetchLinks(checkNotice,null);
		});
		return Result.success("success",checkNotices);
	}

	@RequestMapping("/getNoticeByCondition")
	public Object getNoticeByCondition(String Condition){

		return "";
	}



}
